package io;
import java.io.*;
public class InTest {
    public static void main(String[] args) {
        try {
            InputStream fin=new FileInputStream("E:\\Temp\\java68\\team1\\java68.txt");
            System.out.println("流总共的字节数:"+fin.available());
            //一次读好多
            byte b[]=new byte[20];
            int len=0;
            while((len=fin.read(b))!=-1){
                String str=new String(b,0,len);
                System.out.println(str);
            }


            //一个一个读
//            int ch=0;
//            while((ch=fin.read())!=-1){
//                System.out.print((char)ch);
//                System.out.print(' ');
//            }
            fin.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
